package com.seocoo.worker.friend.module;

import com.seocoo.worker.base.http.BasePageRsp;
import com.seocoo.worker.friend.req.ReqFriendAppraise;
import com.seocoo.worker.friend.rsp.RspFriendAppraise;
import com.sfh.lib.HandleException;
import com.sfh.lib.IResult;
import com.sfh.lib.mvvm.BaseViewModel;

/**
 * author : Ssp
 * e-mail : 981297079@qq.com
 * date   : 2020/3/1520:06
 * desc   :
 * version: 1.0
 */
public class FriendAppraiseModule extends BaseViewModel {

    public void query(ReqFriendAppraise req) {

        this.execute( req, new IResult<BasePageRsp<RspFriendAppraise>>() {
            @Override
            public void onFail(HandleException e) {
                setValue("onSuccess");
            }

            @Override
            public void onSuccess(BasePageRsp<RspFriendAppraise> rspFriendAppraiseBasePageRsp) throws Exception {
                setValue("onSuccess", rspFriendAppraiseBasePageRsp);
            }
        });
    }
}
